/* eslint-disable */

// Import Vue
import Vue from 'vue'
import ErrorHandler from './util/ErrorHandler'
ErrorHandler.share.RegisteredHandler(Vue)

// Import F7
import Framework7 from 'framework7'

// Import F7 Vue Plugin
import Framework7Vue from 'framework7-vue'

// Import F7 iOS Theme Styles
import Framework7Theme from 'framework7/dist/css/framework7.ios.min.css'
import Framework7ThemeColors from 'framework7/dist/css/framework7.ios.colors.min.css'
/* OR for Material Theme:
import Framework7Theme from 'framework7/dist/css/framework7.material.min.css'
import Framework7ThemeColors from 'framework7/dist/css/framework7.material.colors.min.css'
*/

// Import App Custom Styles
import AppStyles from './css/app.styl'

// Import Routes
import Routes from './routes.js'

// Import App Component
import App from './pages/Main/Main.vue'

import './css/icon'
import Icon from 'vue-awesome/components/Icon.vue'
Vue.component('icon', Icon)

import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)

import './mockapi/index'

// Init F7 Vue Plugin
Vue.use(Framework7Vue)

import Vuex from 'vuex'
Vue.use(Vuex)

import './directive/theme.js'

import {
  NativeMessenger,
  EventBus
} from '@syt/nativemessenger'
const navite = NativeMessenger.share
window.receiveNativeMessage = function (name, data) {
  EventBus.share.emit(name, data)
}

// Init App
new Vue({
  el: '#app',
  template: '<app/>',
  // Init Framework7 by passing parameters here
  framework7: {
    root: '#app',
    /* Uncomment to enable Material theme: */
    // material: true,
    routes: Routes
  },
  // Register App Component
  components: {
    app: App
  }
});